package com.kuang.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @program: SpringMVC
 * @description:
 * @author: 陈恩涛
 * @create: 2020-08-02 06:37
 **/
@Controller
public class ModelTest1 {

    @RequestMapping("/m1/t1")
    public String test(Model model) {
        //转发,url不变，默认
        model.addAttribute("msg","ModetTest1");
        //return "/WEB-INF/jsp/test.jsp";
        //return "forward:/WEB-INF/jsp/test.jsp";
        return "test";

        //重定向
        //return "redirect:/index.jsp";
    }


}
